package chongxie;
//继承
public class Pg extends Pet{
    public String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    //无参构造方法
    public Pg(){

    }
    //有参构造方法
    public Pg(String type ){
        super("钱钱"," ",12,14);
        this.type=type;

    }
//重写和注解
    @Override
    public void print() {
        super.print();
        System.out.println("我的性别是:"+type);
    }

    public static void main(String[] args){
        Pg pg=new Pg("Q仔");
        pg.print();
    }
}
